@extends('admin.app')

@section('content')
  <div class="panel panel-default">
    <div class="panel-heading font-bold">
      经纪人详情
    </div>
    <div class="panel-body">
      <form class="form-horizontal">
        <div class="form-group">
          <label class="col-lg-2 control-label">用户名：</label>
          <div class="col-lg-10">
            <p class="form-control-static">{{ $user->username??'--' }}</p>
          </div>
        </div>
        <div class="line line-dashed b-b line-lg"></div>
        <div class="form-group">
          <label class="col-lg-2 control-label">姓名：</label>
          <div class="col-lg-10">
            <p class="form-control-static">{{ $user->userInfo->name??'--' }}</p>
          </div>
        </div>
        <div class="line line-dashed b-b line-lg"></div>
        <div class="form-group">
          <label class="col-lg-2 control-label">用户角色:</label>
          <div class="col-lg-10">
            <p class="form-control-static">{{ ($user->hasRole('Agent')?'经纪人':'').' '.($user->hasRole('Loaner')?'融资人':'').' '.($user->hasRole('User')?'投资人':'') }}</p>
          </div>
        </div>
        <div class="line line-dashed b-b line-lg"></div>
        <div class="form-group">
          <label class="col-lg-2 control-label">身份证号码：</label>
          <div class="col-lg-10">
            <p class="form-control-static">
            @if(!empty($user->userInfo->id_card))
            	{{ $user->userInfo->id_card }}
              <!-- {{substr($user->userInfo->id_card, 0, 4) . '**********' . substr($user->userInfo->id_card, 14) }}</p> -->
            @else
              --
            @endif
          </div>
        </div>
        <div class="line line-dashed b-b line-lg"></div>
        <div class="form-group">
          <label class="col-lg-2 control-label">邮箱地址：</label>
          <div class="col-lg-10">
            <p class="form-control-static">{{ $user->email??'--' }}</p>
          </div>
        </div>
        <div class="line line-dashed b-b line-lg"></div>
        <div class="form-group">
          <label class="col-lg-2 control-label">手机号码：</label>
          <div class="col-lg-10">
            <p class="form-control-static">{{ $user->phone_number??'--' }}</p>
          </div>
        </div>
        <div class="line line-dashed b-b line-lg"></div>
        <div class="form-group">
          <label class="col-lg-2 control-label">支付账户激活</label>
          <div class="col-lg-10">
            <p class="form-control-static">{{ $user->is_set_pay_password?'Y':'N' }}</p>
          </div>
        </div>
        <div class="line line-dashed b-b line-lg"></div>
        <div class="form-group">
          <label class="col-lg-2 control-label">客户总数</label>
          <div class="col-lg-10">
            <p class="form-control-static">{{ $customers_number }}</p>
          </div>
        </div>
        @foreach($invest_statistics as $k=>$v)
	        <div class="line line-dashed b-b line-lg"></div>
	        <div class="form-group">
	          <label class="col-lg-2 control-label">{{ $v['name'] }}</label>
	          <div class="col-lg-10">
	            <p class="form-control-static">{{ $v['money'] }}:元&nbsp;&nbsp;&nbsp;&nbsp;{{$v['transaction_pen']}}笔交易&nbsp;&nbsp;&nbsp;&nbsp;{{$v['person_number']}}人投资</p>
	          </div>
	        </div>
        @endforeach
        <div class="line line-dashed b-b line-lg"></div>
        <div class="form-group">
          <div class="col-lg-4 col-lg-offset-2">
            <a href="javascript:history.back()" class="btn btn-default">返&nbsp;回</a>
          </div>
        </div>
      </form>
    </div>
  </div>
@endsection